# -*- coding: utf-8 -*-
# @Time    : 2019/3/21 14:04
# @Author  : Macher
# @File    : email_picture.py
# @Software: PyCharm Community Edition
import matplotlib.pyplot as plt
from pylab import *                                 #支持中文
mpl.rcParams['font.sans-serif'] = ['SimHei']
def picture():
    names = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149]
    x = range(len(names))
    y95 = [139, 30, 9, 5, 2, 1, 0, 2, 1, 2, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    y65 = [56, 76, 105, 102, 128, 111, 133, 136, 106, 129, 115, 131, 115, 130, 112, 107, 112, 105, 70, 63, 68, 68, 63, 52, 61, 56, 53, 42, 46, 28, 18, 41, 28, 25, 17, 23, 19, 13, 18, 9, 13, 11, 15, 15, 13, 10, 3, 7, 9, 5, 11, 9, 5, 6, 3, 6, 2, 2, 1, 1, 2, 5, 5, 1, 4, 2, 2, 5, 0, 0, 0, 2, 0, 1, 0, 1, 3, 0, 3, 1, 2, 1, 1, 2, 2, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]
    y60 = [17, 15, 6, 14, 21, 23, 10, 16, 19, 31, 22, 24, 24, 28, 21, 33, 24, 25, 38, 37, 32, 25, 36, 43, 34, 40, 44, 42, 44, 46, 43, 45, 44, 42, 43, 47, 46, 61, 35, 35, 41, 53, 50, 47, 42, 48, 45, 41, 48, 37, 45, 33, 35, 37, 39, 37, 33, 28, 29, 35, 32, 36, 27, 33, 33, 29, 27, 23, 12, 29, 31, 24, 19, 15, 21, 21, 22, 20, 13, 22, 21, 14, 10, 20, 21, 17, 21, 16, 10, 20, 22, 22, 15, 10, 12, 15, 11, 9, 19, 8, 9, 7, 8, 14, 9, 11, 9, 4, 16, 12, 9, 9, 13, 5, 11, 7, 4, 9, 14, 10, 6, 6, 7, 4, 4, 5, 8, 5, 3, 4, 6, 2, 3, 1, 2, 6, 9, 2, 5, 3, 1, 4, 2, 1, 3, 5, 0, 4]
    y55 = [7, 9, 7, 3, 3, 3, 5, 3, 1, 5, 8, 14, 8, 7, 6, 4, 4, 4, 2, 5, 7, 5, 8, 6, 7, 6, 4, 4, 3, 8, 7, 10, 4, 7, 10, 5, 9, 10, 10, 9, 10, 6, 6, 20, 8, 18, 9, 12, 6, 12, 9, 8, 11, 14, 6, 7, 8, 8, 19, 10, 19, 15, 17, 12, 14, 13, 20, 23, 10, 13, 18, 22, 8, 16, 13, 9, 17, 17, 16, 21, 15, 20, 20, 17, 12, 21, 13, 11, 15, 18, 17, 20, 18, 20, 21, 20, 22, 22, 16, 16, 14, 20, 19, 19, 15, 10, 12, 20, 22, 25, 15, 19, 16, 16, 20, 18, 14, 8, 11, 18, 12, 11, 13, 21, 10, 16, 10, 19, 15, 18, 11, 9, 21, 13, 11, 12, 13, 15, 18, 12, 7, 9, 15, 11, 6, 15, 17, 12]
    y69 = [240, 291, 278, 273, 247, 175, 198, 124, 94, 110, 90, 81, 46, 52, 42, 35, 29, 25, 18, 12, 10, 14, 13, 9, 7, 7, 9, 12, 3, 5, 5, 5, 5, 3, 2, 4, 2, 2, 0, 3, 0, 0, 2, 0, 0, 2, 4, 0, 2, 1, 1, 0, 0, 2, 0, 2, 0, 1, 1, 3, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    y68 = [156, 251, 244, 241, 233, 221, 189, 150, 134, 144, 103, 107, 74, 65, 66, 52, 39, 42, 31, 28, 20, 17, 12, 19, 15, 13, 14, 11, 12, 10, 6, 8, 5, 6, 5, 4, 2, 5, 5, 2, 2, 2, 2, 2, 1, 1, 2, 1, 0, 2, 4, 1, 3, 1, 1, 0, 0, 1, 1, 3, 0, 1, 2, 2, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]
    y67 =[115, 179, 191, 205, 214, 189, 208, 148, 141, 143, 149, 104, 124, 94, 85, 63, 55, 50, 51, 43, 36, 39, 31, 15, 16, 22, 8, 16, 16, 11, 15, 15, 6, 13, 10, 7, 10, 4, 6, 2, 2, 5, 2, 1, 4, 1, 3, 4, 4, 1, 0, 0, 0, 1, 1, 4, 1, 2, 1, 2, 2, 2, 1, 2, 0, 0, 1, 2, 2, 1, 1, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]

    y66 =[88, 115, 153, 151, 161, 180, 151, 149, 166, 126, 142, 141, 124, 100, 102, 98, 75, 68, 74, 63, 41, 63, 49, 35, 30, 35, 39, 21, 16, 19, 19, 13, 12, 18, 21, 13, 10, 15, 6, 8, 6, 5, 13, 6, 7, 1, 7, 1, 0, 3, 2, 5, 4, 1, 2, 1, 2, 2, 2, 3, 1, 0, 2, 3, 0, 1, 0, 0, 1, 0, 3, 0, 2, 0, 3, 1, 4, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]

    y64 =[46, 53, 68, 73, 76, 98, 98, 109, 100, 96, 97, 105, 97, 98, 107, 111, 128, 102, 86, 78, 94, 63, 75, 67, 63, 51, 59, 49, 53, 52, 46, 46, 42, 33, 42, 37, 35, 40, 22, 22, 17, 15, 21, 24, 16, 28, 16, 9, 10, 4, 12, 7, 11, 10, 6, 15, 5, 4, 9, 7, 7, 5, 9, 5, 3, 4, 5, 5, 1, 3, 2, 3, 3, 2, 0, 1, 0, 2, 2, 1, 2, 5, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]

    y63 =[39, 42, 53, 47, 53, 60, 64, 72, 92, 82, 75, 76, 77, 78, 89, 87, 83, 97, 84, 81, 93, 67, 87, 74, 82, 66, 65, 63, 67, 49, 56, 57, 50, 48, 44, 47, 45, 30, 30, 31, 38, 34, 43, 39, 19, 22, 22, 18, 24, 20, 13, 22, 14, 17, 17, 24, 14, 14, 12, 11, 9, 8, 8, 8, 3, 7, 7, 9, 6, 12, 7, 4, 3, 6, 3, 3, 5, 6, 5, 3, 2, 2, 2, 5, 1, 4, 1, 2, 3, 1, 3, 0, 0, 2, 0, 3, 1, 0, 1, 3, 1, 0, 3, 0, 2, 2, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]

    y62 =[23, 28, 31, 39, 36, 38, 45, 42, 50, 55, 69, 57, 52, 62, 66, 61, 59, 70, 80, 59, 65, 77, 58, 83, 72, 76, 60, 76, 71, 57, 61, 74, 53, 38, 73, 53, 40, 37, 45, 51, 35, 32, 31, 52, 42, 25, 32, 34, 36, 29, 31, 24, 28, 31, 22, 13, 20, 21, 17, 22, 22, 19, 16, 12, 14, 11, 15, 20, 15, 16, 16, 10, 12, 9, 11, 7, 13, 5, 11, 8, 3, 5, 6, 4, 7, 13, 1, 6, 7, 3, 3, 5, 3, 3, 4, 3, 1, 5, 4, 1, 3, 3, 2, 2, 1, 1, 2, 2, 1, 1, 3, 1, 1, 2, 0, 1, 2, 1, 3, 0, 0, 0, 0, 2, 2, 2, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 3, 0, 1]

    y61 =[23, 19, 19, 20, 28, 28, 23, 39, 31, 32, 32, 35, 34, 34, 39, 55, 52, 44, 40, 59, 55, 39, 50, 56, 51, 67, 62, 52, 46, 61, 69, 59, 63, 41, 57, 61, 45, 41, 53, 44, 60, 50, 54, 41, 35, 41, 48, 40, 35, 41, 35, 30, 31, 21, 30, 33, 30, 24, 38, 26, 31, 19, 26, 25, 21, 19, 20, 20, 16, 17, 15, 19, 17, 18, 20, 13, 20, 17, 16, 10, 12, 21, 15, 14, 11, 14, 11, 10, 11, 12, 6, 14, 9, 7, 5, 7, 11, 9, 5, 5, 6, 7, 9, 2, 6, 5, 2, 7, 5, 4, 5, 7, 3, 4, 6, 3, 2, 1, 3, 4, 0, 6, 3, 2, 7, 1, 1, 0, 4, 1, 1, 0, 4, 3, 0, 2, 0, 2, 0, 1, 1, 0, 0, 1, 0, 4, 1, 3]

    # print len(y65)
    # print len(y60)
    #plt.plot(x, y, 'ro-')
    #plt.plot(x, y1, 'bo-')
    #pl.xlim(-1, 11)  # 限定横轴的范围
    #pl.ylim(-1, 110)  # 限定纵轴的范围
    plt.plot(x, y70, marker='o', mec='r', mfc='w',label=u'0.70')
    plt.plot(x, y69, marker='*', ms=10,label=u'0.69')
    plt.plot(x, y68, marker='<', ms=10, label=u'0.68')
    plt.plot(x, y67, marker='>', ms=10, label=u'0.67')
    plt.plot(x, y66, marker='1', ms=10, label=u'0.66')
    plt.plot(x, y65, marker='p', ms=10, label=u'0.65')
    plt.plot(x, y64, marker='H', ms=10, label=u'0.64')
    plt.plot(x, y63, marker='x', ms=10, label=u'0.63')
    plt.plot(x, y62, marker='4', ms=10, label=u'0.62')
    plt.plot(x, y61, marker='3', ms=10, label=u'0.61')
    plt.plot(x, y60, marker='2', ms=10, label=u'0.60')

    # plt.plot(x, y95, marker='o', mec='r', mfc='w', label=u'0.98')
    # plt.plot(x, y90, marker='*', ms=10, label=u'0.90')
    # plt.plot(x, y85, marker='<', ms=10, label=u'0.85')
    # plt.plot(x, y80, marker='>', ms=10, label=u'0.80')
    # plt.plot(x, y75, marker='1', ms=10, label=u'0.75')
    # plt.plot(x, y70, marker='p', ms=10, label=u'0.70')
    # plt.plot(x, y65, marker='H', ms=10, label=u'0.65')
    # plt.plot(x, y60, marker='x', ms=10, label=u'0.60')
    # plt.plot(x, y55, marker='4', ms=10, label=u'0.55')


    plt.legend()  # 让图例生效
    plt.xticks(x, names, rotation=45)
    plt.margins(0)
    plt.subplots_adjust(bottom=0.15)
    plt.xlabel(u"n元素组") #X轴标签
    plt.ylabel(u"元素组个数") #Y轴标签
    plt.title(u"不同相似度下元素组个数变化趋势") #标题

    plt.show()
d95 = {2: 139, 3: 30, 4: 9, 5: 5, 6: 2, 7: 1, 9: 2, 10: 1, 11: 2, 13: 1, 14: 1, 17: 1, 20: 1}
d85 = {48: 1, 2: 264, 3: 93, 4: 36, 5: 15, 6: 9, 7: 11, 40: 1, 9: 6, 10: 3, 11: 6, 12: 1, 13: 1, 49: 1, 16: 1, 43: 1, 19: 1, 21: 1, 8: 6, 26: 1}
d80 = {2: 381, 3: 151, 4: 83, 5: 31, 6: 16, 7: 12, 8: 9, 9: 8, 10: 6, 11: 8, 12: 3, 13: 2, 14: 1, 15: 1, 16: 1, 17: 1, 19: 2, 21: 1, 22: 1, 23: 2, 28: 1, 29: 1, 30: 2, 32: 1, 41: 1, 45: 1, 50: 1, 55: 1, 56: 1}
d75 = {2: 529, 3: 297, 4: 173, 5: 127, 6: 79, 7: 39, 8: 36, 9: 18, 10: 17, 11: 14, 12: 5, 13: 13, 14: 7, 15: 6, 16: 3, 17: 2, 18: 3, 19: 3, 20: 2, 23: 1, 24: 1, 26: 3, 27: 3, 28: 1, 29: 2, 30: 2, 31: 3, 34: 1, 38: 2, 41: 1, 46: 1, 47: 1, 51: 1, 52: 1, 58: 1, 61: 1, 70: 1}
d70 = {2: 312, 3: 337, 4: 325, 5: 268, 6: 220, 7: 187, 8: 140, 9: 111, 10: 88, 11: 71, 12: 76, 13: 44, 14: 42, 15: 36, 16: 32, 17: 27, 18: 13, 19: 16, 20: 8, 21: 10, 22: 11, 23: 7, 24: 7, 25: 8, 26: 5, 27: 7, 28: 5, 29: 3, 30: 3, 31: 4, 32: 7, 33: 4, 34: 2, 35: 2, 36: 1, 37: 1, 38: 1, 41: 1, 42: 2, 44: 2, 47: 2, 48: 1, 51: 2, 52: 1, 53: 2, 55: 2, 56: 2, 58: 1, 59: 2, 65: 1, 66: 1, 70: 1, 75: 1, 120: 1}
d65 = {2: 56, 3: 76, 4: 105, 5: 102, 6: 128, 7: 111, 8: 133, 9: 136, 10: 106, 11: 129, 12: 115, 13: 131, 14: 115, 15: 130, 16: 112, 17: 107, 18: 112, 19: 105, 20: 70, 21: 63, 22: 68, 23: 68, 24: 63, 25: 52, 26: 61, 27: 56, 28: 53, 29: 42, 30: 46, 31: 28, 32: 18, 33: 41, 34: 28, 35: 25, 36: 17, 37: 23, 38: 19, 39: 13, 40: 18, 41: 9, 42: 13, 43: 11, 44: 15, 45: 15, 46: 13, 47: 10, 48: 3, 49: 7, 50: 9, 51: 5, 52: 11, 53: 9, 54: 5, 55: 6, 56: 3, 57: 6, 58: 2, 59: 2, 60: 1, 61: 1, 62: 2, 63: 5, 64: 5, 65: 1, 66: 4, 67: 2, 68: 2, 69: 5, 73: 2, 75: 1, 77: 1, 78: 3, 80: 3, 81: 1, 82: 2, 83: 1, 84: 1, 85: 2, 86: 2, 87: 1, 90: 2, 97: 1, 100: 1, 147: 1}
d60 = {2: 17, 3: 15, 4: 6, 5: 14, 6: 21, 7: 23, 8: 10, 9: 16, 10: 19, 11: 31, 12: 22, 13: 24, 14: 24, 15: 28, 16: 21, 17: 33, 18: 24, 19: 25, 20: 38, 21: 37, 22: 32, 23: 25, 24: 36, 25: 43, 26: 34, 27: 40, 28: 44, 29: 42, 30: 44, 31: 46, 32: 43, 33: 45, 34: 44, 35: 42, 36: 43, 37: 47, 38: 46, 39: 61, 40: 35, 41: 35, 42: 41, 43: 53, 44: 50, 45: 47, 46: 42, 47: 48, 48: 45, 49: 41, 50: 48, 51: 37, 52: 45, 53: 33, 54: 35, 55: 37, 56: 39, 57: 37, 58: 33, 59: 28, 60: 29, 61: 35, 62: 32, 63: 36, 64: 27, 65: 33, 66: 33, 67: 29, 68: 27, 69: 23, 70: 12, 71: 29, 72: 31, 73: 24, 74: 19, 75: 15, 76: 21, 77: 21, 78: 22, 79: 20, 80: 13, 81: 22, 82: 21, 83: 14, 84: 10, 85: 20, 86: 21, 87: 17, 88: 21, 89: 16, 90: 10, 91: 20, 92: 22, 93: 22, 94: 15, 95: 10, 96: 12, 97: 15, 98: 11, 99: 9, 100: 19, 101: 8, 102: 9, 103: 7, 104: 8, 105: 14, 106: 9, 107: 11, 108: 9, 109: 4, 110: 16, 111: 12, 112: 9, 113: 9, 114: 13, 115: 5, 116: 11, 117: 7, 118: 4, 119: 9, 120: 14, 121: 10, 122: 6, 123: 6, 124: 7, 125: 4, 126: 4, 127: 5, 128: 8, 129: 5, 130: 3, 131: 4, 132: 6, 133: 2, 134: 3, 135: 1, 136: 2, 137: 6, 138: 9, 139: 2, 140: 5, 141: 3, 142: 1, 143: 4, 144: 2, 145: 1, 146: 3, 147: 5, 149: 4, 150: 4, 151: 1, 152: 2, 153: 3, 154: 3, 155: 1, 156: 1, 157: 2, 158: 2, 159: 1, 160: 3, 161: 5, 163: 4, 164: 1, 166: 1, 167: 1, 168: 2, 172: 3, 174: 3, 176: 3, 181: 1, 182: 1, 184: 2, 186: 1, 188: 1, 192: 1, 194: 1, 195: 1, 200: 1, 203: 1, 205: 1, 207: 1, 210: 1, 219: 1, 222: 1, 235: 1}
d90 = {2: 183, 3: 52, 4: 18, 5: 10, 6: 4, 39: 1, 8: 3, 10: 2, 11: 2, 44: 2, 34: 1, 15: 1, 18: 1, 20: 1, 22: 1, 7: 2, 13: 2}
d55 = {2: 7, 3: 9, 4: 7, 5: 3, 6: 3, 7: 3, 8: 5, 9: 3, 10: 1, 11: 5, 12: 8, 13: 14, 14: 8, 15: 7, 16: 6, 17: 4, 18: 4, 19: 4, 20: 2, 21: 5, 22: 7, 23: 5, 24: 8, 25: 6, 26: 7, 27: 6, 28: 4, 29: 4, 30: 3, 31: 8, 32: 7, 33: 10, 34: 4, 35: 7, 36: 10, 37: 5, 38: 9, 39: 10, 40: 10, 41: 9, 42: 10, 43: 6, 44: 6, 45: 20, 46: 8, 47: 18, 48: 9, 49: 12, 50: 6, 51: 12, 52: 9, 53: 8, 54: 11, 55: 14, 56: 6, 57: 7, 58: 8, 59: 8, 60: 19, 61: 10, 62: 19, 63: 15, 64: 17, 65: 12, 66: 14, 67: 13, 68: 20, 69: 23, 70: 10, 71: 13, 72: 18, 73: 22, 74: 8, 75: 16, 76: 13, 77: 9, 78: 17, 79: 17, 80: 16, 81: 21, 82: 15, 83: 20, 84: 20, 85: 17, 86: 12, 87: 21, 88: 13, 89: 11, 90: 15, 91: 18, 92: 17, 93: 20, 94: 18, 95: 20, 96: 21, 97: 20, 98: 22, 99: 22, 100: 16, 101: 16, 102: 14, 103: 20, 104: 19, 105: 19, 106: 15, 107: 10, 108: 12, 109: 20, 110: 22, 111: 25, 112: 15, 113: 19, 114: 16, 115: 16, 116: 20, 117: 18, 118: 14, 119: 8, 120: 11, 121: 18, 122: 12, 123: 11, 124: 13, 125: 21, 126: 10, 127: 16, 128: 10, 129: 19, 130: 15, 131: 18, 132: 11, 133: 9, 134: 21, 135: 13, 136: 11, 137: 12, 138: 13, 139: 15, 140: 18, 141: 12, 142: 7, 143: 9, 144: 15, 145: 11, 146: 6, 147: 15, 148: 17, 149: 12, 150: 7, 151: 7, 152: 20, 153: 9, 154: 19, 155: 17, 156: 9, 157: 13, 158: 8, 159: 7, 160: 10, 161: 10, 162: 13, 163: 12, 164: 11, 165: 7, 166: 14, 167: 7, 168: 9, 169: 10, 170: 10, 171: 8, 172: 9, 173: 13, 174: 10, 175: 13, 176: 6, 177: 11, 178: 10, 179: 16, 180: 15, 181: 11, 182: 6, 183: 12, 184: 11, 185: 10, 186: 8, 187: 6, 188: 14, 189: 9, 190: 7, 191: 7, 192: 5, 193: 12, 194: 14, 195: 5, 196: 14, 197: 13, 198: 9, 199: 6, 200: 11, 201: 11, 202: 9, 203: 11, 204: 4, 205: 10, 206: 14, 207: 6, 208: 8, 209: 9, 210: 10}
d69 = {2: 240, 3: 291, 4: 278, 5: 273, 6: 247, 7: 175, 8: 198, 9: 124, 10: 94, 11: 110, 12: 90, 13: 81, 14: 46, 15: 52, 16: 42, 17: 35, 18: 29, 19: 25, 20: 18, 21: 12, 22: 10, 23: 14, 24: 13, 25: 9, 26: 7, 27: 7, 28: 9, 29: 12, 30: 3, 31: 5, 32: 5, 33: 5, 34: 5, 35: 3, 36: 2, 37: 4, 38: 2, 39: 2, 41: 3, 44: 2, 47: 2, 48: 4, 50: 2, 51: 1, 52: 1, 137: 1, 57: 2, 59: 1, 60: 1, 61: 3, 65: 1, 66: 2, 75: 1, 71: 1, 72: 1, 55: 2}
d68 = {2: 156, 3: 251, 4: 244, 5: 241, 6: 233, 7: 221, 8: 189, 9: 150, 10: 134, 11: 144, 12: 103, 13: 107, 14: 74, 15: 65, 16: 66, 17: 52, 18: 39, 19: 42, 20: 31, 21: 28, 22: 20, 23: 17, 24: 12, 25: 19, 26: 15, 27: 13, 28: 14, 29: 11, 30: 12, 31: 10, 32: 6, 33: 8, 34: 5, 35: 6, 36: 5, 37: 4, 38: 2, 39: 5, 40: 5, 41: 2, 42: 2, 43: 2, 44: 2, 45: 2, 46: 1, 47: 1, 48: 2, 49: 1, 51: 2, 52: 4, 53: 1, 54: 3, 55: 1, 56: 1, 59: 1, 60: 1, 61: 3, 63: 1, 64: 2, 65: 2, 68: 1, 70: 1, 71: 1, 72: 1, 73: 1, 78: 1, 147: 1}
d67 ={2: 115, 3: 179, 4: 191, 5: 205, 6: 214, 7: 189, 8: 208, 9: 148, 10: 141, 11: 143, 12: 149, 13: 104, 14: 124, 15: 94, 16: 85, 17: 63, 18: 55, 19: 50, 20: 51, 21: 43, 22: 36, 23: 39, 24: 31, 25: 15, 26: 16, 27: 22, 28: 8, 29: 16, 30: 16, 31: 11, 32: 15, 33: 15, 34: 6, 35: 13, 36: 10, 37: 7, 38: 10, 39: 4, 40: 6, 41: 2, 42: 2, 43: 5, 44: 2, 45: 1, 46: 4, 47: 1, 48: 3, 49: 4, 50: 4, 51: 1, 55: 1, 56: 1, 57: 4, 58: 1, 59: 2, 60: 1, 61: 2, 62: 2, 63: 2, 64: 1, 65: 2, 68: 1, 69: 2, 70: 2, 71: 1, 72: 1, 74: 1, 75: 2, 76: 1, 84: 1, 147: 1}
d66 = {2: 88, 3: 115, 4: 153, 5: 151, 6: 161, 7: 180, 8: 151, 9: 149, 10: 166, 11: 126, 12: 142, 13: 141, 14: 124, 15: 100, 16: 102, 17: 98, 18: 75, 19: 68, 20: 74, 21: 63, 22: 41, 23: 63, 24: 49, 25: 35, 26: 30, 27: 35, 28: 39, 29: 21, 30: 16, 31: 19, 32: 19, 33: 13, 34: 12, 35: 18, 36: 21, 37: 13, 38: 10, 39: 15, 40: 6, 41: 8, 42: 6, 43: 5, 44: 13, 45: 6, 46: 7, 47: 1, 48: 7, 49: 1, 51: 3, 52: 2, 53: 5, 54: 4, 55: 1, 56: 2, 57: 1, 58: 2, 59: 2, 60: 2, 61: 3, 62: 1, 64: 2, 65: 3, 67: 1, 70: 1, 72: 3, 74: 2, 76: 3, 77: 1, 78: 4, 79: 1, 81: 2, 92: 1, 147: 1}
d64 = {2: 46, 3: 53, 4: 68, 5: 73, 6: 76, 7: 98, 8: 98, 9: 109, 10: 100, 11: 96, 12: 97, 13: 105, 14: 97, 15: 98, 16: 107, 17: 111, 18: 128, 19: 102, 20: 86, 21: 78, 22: 94, 23: 63, 24: 75, 25: 67, 26: 63, 27: 51, 28: 59, 29: 49, 30: 53, 31: 52, 32: 46, 33: 46, 34: 42, 35: 33, 36: 42, 37: 37, 38: 35, 39: 40, 40: 22, 41: 22, 42: 17, 43: 15, 44: 21, 45: 24, 46: 16, 47: 28, 48: 16, 49: 9, 50: 10, 51: 4, 52: 12, 53: 7, 54: 11, 55: 10, 56: 6, 57: 15, 58: 5, 59: 4, 60: 9, 61: 7, 62: 7, 63: 5, 64: 9, 65: 5, 66: 3, 67: 4, 68: 5, 69: 5, 70: 1, 71: 3, 72: 2, 73: 3, 74: 3, 75: 2, 77: 1, 79: 2, 80: 2, 81: 1, 82: 2, 83: 5, 84: 1, 85: 1, 86: 2, 87: 1, 88: 3, 89: 1, 90: 1, 91: 1, 92: 1, 93: 1, 94: 1, 97: 1, 98: 1, 101: 1, 103: 1, 104: 1, 105: 1, 111: 1, 112: 1, 147: 1}
d63 = {2: 39, 3: 42, 4: 53, 5: 47, 6: 53, 7: 60, 8: 64, 9: 72, 10: 92, 11: 82, 12: 75, 13: 76, 14: 77, 15: 78, 16: 89, 17: 87, 18: 83, 19: 97, 20: 84, 21: 81, 22: 93, 23: 67, 24: 87, 25: 74, 26: 82, 27: 66, 28: 65, 29: 63, 30: 67, 31: 49, 32: 56, 33: 57, 34: 50, 35: 48, 36: 44, 37: 47, 38: 45, 39: 30, 40: 30, 41: 31, 42: 38, 43: 34, 44: 43, 45: 39, 46: 19, 47: 22, 48: 22, 49: 18, 50: 24, 51: 20, 52: 13, 53: 22, 54: 14, 55: 17, 56: 17, 57: 24, 58: 14, 59: 14, 60: 12, 61: 11, 62: 9, 63: 8, 64: 8, 65: 8, 66: 3, 67: 7, 68: 7, 69: 9, 70: 6, 71: 12, 72: 7, 73: 4, 74: 3, 75: 6, 76: 3, 77: 3, 78: 5, 79: 6, 80: 5, 81: 3, 82: 2, 83: 2, 84: 2, 85: 5, 86: 1, 87: 4, 88: 1, 89: 2, 90: 3, 91: 1, 92: 3, 95: 2, 97: 3, 98: 1, 100: 1, 101: 3, 102: 1, 104: 3, 106: 2, 107: 2, 108: 1, 110: 1, 112: 1, 116: 1, 118: 2, 121: 1, 125: 1, 130: 1, 147: 1}
d62 = {2: 23, 3: 28, 4: 31, 5: 39, 6: 36, 7: 38, 8: 45, 9: 42, 10: 50, 11: 55, 12: 69, 13: 57, 14: 52, 15: 62, 16: 66, 17: 61, 18: 59, 19: 70, 20: 80, 21: 59, 22: 65, 23: 77, 24: 58, 25: 83, 26: 72, 27: 76, 28: 60, 29: 76, 30: 71, 31: 57, 32: 61, 33: 74, 34: 53, 35: 38, 36: 73, 37: 53, 38: 40, 39: 37, 40: 45, 41: 51, 42: 35, 43: 32, 44: 31, 45: 52, 46: 42, 47: 25, 48: 32, 49: 34, 50: 36, 51: 29, 52: 31, 53: 24, 54: 28, 55: 31, 56: 22, 57: 13, 58: 20, 59: 21, 60: 17, 61: 22, 62: 22, 63: 19, 64: 16, 65: 12, 66: 14, 67: 11, 68: 15, 69: 20, 70: 15, 71: 16, 72: 16, 73: 10, 74: 12, 75: 9, 76: 11, 77: 7, 78: 13, 79: 5, 80: 11, 81: 8, 82: 3, 83: 5, 84: 6, 85: 4, 86: 7, 87: 13, 88: 1, 89: 6, 90: 7, 91: 3, 92: 3, 93: 5, 94: 3, 95: 3, 96: 4, 97: 3, 98: 1, 99: 5, 100: 4, 101: 1, 102: 3, 103: 3, 104: 2, 105: 2, 106: 1, 107: 1, 108: 2, 109: 2, 110: 1, 111: 1, 112: 3, 113: 1, 114: 1, 115: 2, 117: 1, 118: 2, 119: 1, 120: 3, 125: 2, 126: 2, 127: 2, 129: 1, 130: 2, 140: 1, 141: 1, 142: 1, 147: 3, 149: 1}
d61 = {2: 23, 3: 19, 4: 19, 5: 20, 6: 28, 7: 28, 8: 23, 9: 39, 10: 31, 11: 32, 12: 32, 13: 35, 14: 34, 15: 34, 16: 39, 17: 55, 18: 52, 19: 44, 20: 40, 21: 59, 22: 55, 23: 39, 24: 50, 25: 56, 26: 51, 27: 67, 28: 62, 29: 52, 30: 46, 31: 61, 32: 69, 33: 59, 34: 63, 35: 41, 36: 57, 37: 61, 38: 45, 39: 41, 40: 53, 41: 44, 42: 60, 43: 50, 44: 54, 45: 41, 46: 35, 47: 41, 48: 48, 49: 40, 50: 35, 51: 41, 52: 35, 53: 30, 54: 31, 55: 21, 56: 30, 57: 33, 58: 30, 59: 24, 60: 38, 61: 26, 62: 31, 63: 19, 64: 26, 65: 25, 66: 21, 67: 19, 68: 20, 69: 20, 70: 16, 71: 17, 72: 15, 73: 19, 74: 17, 75: 18, 76: 20, 77: 13, 78: 20, 79: 17, 80: 16, 81: 10, 82: 12, 83: 21, 84: 15, 85: 14, 86: 11, 87: 14, 88: 11, 89: 10, 90: 11, 91: 12, 92: 6, 93: 14, 94: 9, 95: 7, 96: 5, 97: 7, 98: 11, 99: 9, 100: 5, 101: 5, 102: 6, 103: 7, 104: 9, 105: 2, 106: 6, 107: 5, 108: 2, 109: 7, 110: 5, 111: 4, 112: 5, 113: 7, 114: 3, 115: 4, 116: 6, 117: 3, 118: 2, 119: 1, 120: 3, 121: 4, 123: 6, 124: 3, 125: 2, 126: 7, 127: 1, 128: 1, 130: 4, 131: 1, 132: 1, 134: 4, 135: 3, 137: 2, 139: 2, 141: 1, 142: 1, 145: 1, 147: 4, 148: 1, 149: 3, 150: 1, 151: 1, 153: 1, 157: 1, 159: 1, 163: 1, 164: 1, 168: 1, 170: 1, 175: 1, 183: 1, 185: 1, 198: 1}
# picture()

def deal_num(d1):
    lx = []
    ly = []
    for i in range(2,150):
        if d1.has_key(i):
            continue
        else: d1[i] = 0
    for key in d1:
        # lx.append(key)
        ly.append(d1[key])
    # print lx
    # print ly
    return ly
# y1 = deal_num(d69)
# y2 = deal_num(d68)
# y3 = deal_num(d67)
# y4 = deal_num(d66)
# # y5 = deal_num(d65)
# y5 = deal_num(d64)
# y6 = deal_num(d63)
# y7 = deal_num(d62)
# y8 = deal_num(d61)
# # y5 = deal_num(d75)
# print y1[0:148]
# print y2[0:148]
# print y3[0:148]
# print y4[0:148]
# print y5[0:148]
# print y6[0:148]
# print y7[0:148]
# print y8[0:148]
def picture2():
    names = [0.95,0.9,0.85,0.8,0.75,0.7,0.65,0.6,0.55]
    x = range(len(names))
    y = [195,286,459,730,1400,2466,3088,3244,3285]
       # print len(y65)
    # print len(y60)
    #plt.plot(x, y, 'ro-')
    #plt.plot(x, y1, 'bo-')
    #pl.xlim(-1, 11)  # 限定横轴的范围
    #pl.ylim(-1, 110)  # 限定纵轴的范围
    plt.plot(x, y, marker='o', mec='r', mfc='w',label=u'相似度')
    # plt.plot(x, y90, marker='*', ms=10,label=u'0.9')
    # plt.plot(x, y85, marker='<', ms=10, label=u'0.85')
    # plt.plot(x, y80, marker='>', ms=10, label=u'0.80')
    # plt.plot(x, y75, marker='1', ms=10, label=u'0.75')
    # plt.plot(x, y70, marker='p', ms=10, label=u'0.70')
    # plt.plot(x, y65, marker='H', ms=10, label=u'0.65')
    # plt.plot(x, y60, marker='H', ms=10, label=u'0.60')

    plt.legend()  # 让图例生效
    plt.xticks(x, names, rotation=45)
    plt.margins(0)
    plt.subplots_adjust(bottom=0.15)
    plt.xlabel(u"不同相似度") #X轴标签
    plt.ylabel(u"类别数量") #Y轴标签
    plt.title(u"不同相似度下类别数量变化趋势") #标题
    plt.show()
picture()
# picture2()
# y65 = [56, 76, 105, 102, 128, 111, 133, 136, 106, 129, 115, 131, 115, 130, 112, 107, 112, 105, 70, 63, 68, 68, 63, 52, 61, 56, 53, 42, 46, 28, 18, 41, 28, 25, 17, 23, 19, 13, 18, 9, 13, 11, 15, 15, 13, 10, 3, 7, 9, 5, 11, 9, 5, 6, 3, 6, 2, 2, 1, 1, 2, 5, 5, 1, 4, 2, 2, 5, 0, 0, 0, 2, 0, 1, 0, 1, 3, 0, 3, 1, 2, 1, 1, 2, 2, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]
# y60 = [240, 291, 278, 273, 247, 175, 198, 124, 94, 110, 90, 81, 46, 52, 42, 35, 29, 25, 18, 12, 10, 14, 13, 9, 7, 7, 9, 12, 3, 5, 5, 5, 5, 3, 2, 4, 2, 2, 0, 3, 0, 0, 2, 0, 0, 2, 4, 0, 2, 1, 1, 0, 0, 2, 0, 2, 0, 1, 1, 3, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
# print len(y60)
